function [dataX_normalize, data_fa_in, data_fa_out] = ...
    normalize_data(dataX, normalize_type, stock_id, ...
    y_in, y_out, time_lag, data_FA_in, data_FA_out)

switch normalize_type
    case 'ratio'
        dataX_normalize = normalize_ratio(dataX);
        
        data_fa = dataX_normalize(...
            find(dataX_normalize(:,1) == stock_id),:);
        
        data_fa_in = data_fa(i:i+y_in-1,4:end);
        data_fa_out = data_fa(i+y_in-time_lag : ...
            i + y_in + y_out - 1 - time_lag, 4:end);
        
    case 'quar'
        dataX_normalize = normalize_quar(dataX);
        
        data_fa_in = data_FA_in(:,4:end);
        data_fa_out = data_FA_out(:,4:end);
end
end

